﻿Public Class MessageBlock
    Public Version As Integer
    Public Id As Integer
    Public InReplyToId As Integer
    Friend Type As String
    Public Message As Byte()
    'Public BinaryData() As Byte
    Friend Code As String

    'Friend Function GetPayloadSize() As Integer
    '    Dim iRet As Integer = 0
    '    If Message IsNot Nothing Then iRet += Message.Length
    '    'If BinaryData IsNot Nothing Then iRet += BinaryData.Length
    '    Return iRet
    'End Function
End Class

'Public Class DataBlock
'    ''' <summary>
'    ''' Block version
'    ''' </summary>
'    ''' <remarks></remarks>
'    Public Version As Integer
'    Friend CommandCode As String
'    ''' <summary>
'    ''' Id, as specified by sender
'    ''' </summary>
'    ''' <remarks></remarks>
'    Public Tag As String
'    Public DataStream As IO.Stream
'    Public InReplyToMessageId As Integer

'    Friend Count As Integer
'    Public ReferenceId As String
'    Public DataStreamChecksumMismatch As Boolean
'End Class

Public Class OutgoingDataChannelBlock
    Public ReferenceId As String
    Public Tag As String
    Public DataStream As System.IO.Stream
    Public BytesToSend As Integer
    Public TrackingId As String
End Class
Public Class IncomingDataChannelBlock
    Friend ChannelName As String
    Public ReferenceId As String
    Public TrackingId As String
    Public BytesRead As Integer
    Public Crc32CheckFailed As Boolean
End Class

